package com.ruoyi.web.controller.wechat.request;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * TODO
 *
 * @author chenchuan2
 * @date 2023-03-14 16:15:22
 */
@Data
public class NotificationRequest {

    /**
     * 是否出发
     */
    @NotNull
    private Boolean haveStart;

    /**
     * 发车时间
     */
    @NotNull
    private String startTime;

    /**
     * 目的地
     */
    @NotNull
    private String destination;

    /**
     * 通知内
     */
    private String notification;

    @Override
    public String toString() {
        String msg = getStartTime() + "开往" + destination + "班车" + (getHaveStart() ? "正常发车" : "暂不发车");
        if (StringUtils.isBlank(getNotification())) {
            msg = msg + ":" + getNotification();
        }
        return msg;
    }
}
